/*
 * Copyright (c) 2023 Huawei Technologies Co., Ltd.
 * openUBMC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#ifndef __AWM_M11P_CARD_H__
#define __AWM_M11P_CARD_H__

#include "interface/pcie_card.h"
#include "interface/pcie_device.h"
#include <mc/engine.h>

namespace dev {

class awm_m11p_card : public mc::engine::object<awm_m11p_card> {
public:
    MC_OBJECT(awm_m11p_card, "PCIeGpuCard",
              "/bmc/dev/Systems/1/PCIeGpuCard/${object_name}", // TBD：SystemId暂时写死
              (PCIeDevice)(PCIeCard))
    awm_m11p_card()  = default;
    ~awm_m11p_card() = default;
    bool start();
    bool stop();
    bool init(mc::mutable_dict& csr_object, const mc::dict& connector);
    bool replace_dynamic_property(mc::mutable_dict& object, const mc::dict& connector);

    PCIeDevice m_pcie_device;
    PCIeCard   m_pcie_card;
    uint8_t    SystemId;
};

} // namespace dev

#endif // __AWM_M11P_CARD_H__
